Lars Ingebrigtsen [Tue, 7 Jun 2022 18:03:41 +0000 (20:03 +0200)]
Demote extended attribute errors in basic-save-buffer-2
* lisp/files.el (basic-save-buffer-2): Give demoted errors when
reading extended attributes that fail (bug#43723).
Lars Ingebrigtsen [Tue, 7 Jun 2022 16:59:44 +0000 (18:59 +0200)]
Regenerated ldefs-boot.el
This is the first check-in after the loaddefs-gen.el rewrite.
Lars Ingebrigtsen [Tue, 7 Jun 2022 16:59:04 +0000 (18:59 +0200)]
Remove Mtn from vc-handled-backends
* lisp/vc/vc-hooks.el (vc-handled-backends): Remove the deprecate
vc-mtn backend.
Lars Ingebrigtsen [Tue, 7 Jun 2022 16:51:15 +0000 (18:51 +0200)]
Fix loaddefs-generate--rubric recorded name
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Fix
the name that's recorded in the file -- this is only used by
loaddefs-gen now, I think.
Lars Ingebrigtsen [Tue, 7 Jun 2022 16:35:00 +0000 (18:35 +0200)]
Make artist-mode work in zoomed buffers
* lisp/textmodes/artist.el (artist-mouse-draw-continously):
(artist-mouse-draw-continously):
(artist-mouse-draw-poly):
(artist-mouse-draw-1point):
(artist-mouse-draw-2points):
(artist-mouse-draw-2points): Work better when the window is zoomed
(bug#46035).
Lars Ingebrigtsen [Tue, 7 Jun 2022 16:34:20 +0000 (18:34 +0200)]
Allow posn-col-row to return data on a per-window basis
* doc/lispref/commands.texi (Accessing Mouse): Document it.
* lisp/subr.el (posn-col-row): Extend to use window data.
Lars Ingebrigtsen [Tue, 7 Jun 2022 14:38:55 +0000 (16:38 +0200)]
Allow hooks to alter the process in prolog-ensure-process
* lisp/progmodes/prolog.el (prolog-ensure-process): Start the mode
after starting the process, so that the mode hook can talk to the
process (bug#46003).
Stefan Monnier [Tue, 7 Jun 2022 14:30:47 +0000 (10:30 -0400)]
find-func.el: Fix bug#41104
* lisp/emacs-lisp/find-func.el (find-function-advised-original): Look
at the actual function definition rather than
`advice--symbol-function` which sometimes returns only the advice.
* test/lisp/emacs-lisp/find-func-tests.el
(find-func-tests--find-library-verbose): Add test.
Po Lu [Tue, 7 Jun 2022 13:45:17 +0000 (21:45 +0800)]
Add selection stuff to DND tests
* test/lisp/dnd-tests.el (dnd-tests-selection-table): New
defvar.
(gui-set-selection): Actually implement in a way that validates
the local value and stores it for future use.
(dnd-tests-verify-selection-data): New function.
(dnd-tests-begin-text-drag): Add tests for the contents of
various selections.
Po Lu [Tue, 7 Jun 2022 12:13:10 +0000 (12:13 +0000)]
Fix coding style of some Haiku files
* src/haiku_support.cc: (FrameResized):
(class EmacsView, AfterResize): Fix coding and initializer
style.
* src/haiku_support.h (struct haiku_resize_event): Rename
confusingly named fields.
* src/haikuterm.c (haiku_read_socket): Update accordingly.
Lars Ingebrigtsen [Tue, 7 Jun 2022 11:23:22 +0000 (13:23 +0200)]
Simplify mode line for vc-print-root-log
* lisp/vc/vc.el (vc-print-root-log): Don't display "from <file>"
(bug#45007).
Po Lu [Tue, 7 Jun 2022 10:23:52 +0000 (18:23 +0800)]
Fix more bugs with DND selection handling
* src/xterm.c (x_defer_selection_requests)
(x_release_selection_requests): New functions.
(x_dnd_begin_drag_and_drop): Use those functions to defer
selections instead. Fix error signalled when ownership of
XdndSelection is lost.
(handle_one_xevent): Likewise.
Lars Ingebrigtsen [Tue, 7 Jun 2022 10:21:53 +0000 (12:21 +0200)]
Clarify highlight-changes-rotate-faces doc string
* lisp/hilit-chg.el (highlight-changes-rotate-faces): Doc string
clarification (bug#44150).
Po Lu [Tue, 7 Jun 2022 07:44:05 +0000 (15:44 +0800)]
Remove mentions of GNOME MediaKeys from dbus documentation examples
* doc/misc/dbus.texi (Properties and Annotations):
* lisp/net/dbus.el (dbus-get-all-managed-objects): Remove
mentions of obsolete GNOME APIs from example text.
Po Lu [Tue, 7 Jun 2022 05:49:41 +0000 (13:49 +0800)]
Improve compatibility with some clients of the Motif drop protocol
* lisp/select.el (x-dnd-targets-list): New defvar.
(xselect-convert-to-targets): Convert XdndSelection based on the
DND targets list.
* src/xfns.c (Fx_begin_drag): Pass new argument.
* src/xselect.c (struct x_selection_request): New struct.
(x_push_current_selection_request):
(x_pop_current_selection_request): New functions.
(x_selection_request_lisp_error, x_reply_selection_request)
(x_handle_selection_request, x_convert_selection)
(syms_of_xselect_for_pdumper): Correctly handle recursive
requests for MULTIPLE by maintaining a stack of selection
requests, converted selections, and other data.
* src/xterm.c (x_dnd_begin_drag_and_drop): New argument
`selection_target_list'. Bind it to the DND targets list.
(syms_of_xterm): New defvar and associated defsym.
* src/xterm.h: Update prototypes.
Po Lu [Tue, 7 Jun 2022 05:07:26 +0000 (13:07 +0800)]
Add new drag-and-drop test
* test/lisp/dnd-tests.el (dnd-tests-get-local-file-uri): New
test.
Po Lu [Tue, 7 Jun 2022 04:59:37 +0000 (12:59 +0800)]
Fix leak of event data on GTK+ 2.x
* src/xterm.c (handle_one_xevent): Fix goto XI_OTHER for
valuator motion events generated on scroll bars.
Po Lu [Tue, 7 Jun 2022 02:44:08 +0000 (02:44 +0000)]
Update Haiku drag-and-drop code
* lisp/term/haiku-win.el (haiku-drag-and-drop): Don't allow
dropping on places other than the text area (it doesn't work).
Also respect mouse-yank-at-point.
Po Lu [Tue, 7 Jun 2022 02:39:55 +0000 (10:39 +0800)]
Don't allow dropping on invalid drop sites
* lisp/x-dnd.el (x-dnd-drop-data): If dropping on something
other than the text area, don't set point.
(x-dnd-handle-xdnd, x-dnd-handle-motif): Don't pretend dropping
on the mode line is ok.
Po Lu [Tue, 7 Jun 2022 02:27:03 +0000 (10:27 +0800)]
Don't display mouse face during mouse drag-and-drop
* lisp/mouse.el (mouse-drag-and-drop-region): Don't display
mouse face, since it leads to a lot of flicker.
Po Lu [Tue, 7 Jun 2022 01:45:41 +0000 (09:45 +0800)]
Prevent crashes with very large Motif targets tables
* src/xterm.c (xm_setup_dnd_targets): Catch errors around
xm_write_targets_table lest we get a BadAlloc error.
Po Lu [Tue, 7 Jun 2022 01:26:15 +0000 (09:26 +0800)]
Fix two crashes when a display connection is lost
This fixes errors caused by invalid error traps being left on
the error handler stack if an IO error causes a non-local exit
out of the protected code, and another crash caused by
delete_frame trying to read async input.
* src/eval.c (unwind_to_catch, push_handler_nosignal): Save and
restore the X error handler stack.
* src/lisp.h (struct handler): [HAVE_X_WINDOWS]: New field
`x_error_handler_depth'.
* src/xterm.c (struct x_error_message_stack): Make string a
regular string.
(x_unwind_errors_to): New function.
(x_error_catcher, x_catch_errors_with_handler)
(x_uncatch_errors_after_check, x_uncatch_errors): Update the
stack depth.
(x_check_errors): Stop manually unwinding since unwind_to_catch
now does that for us.
(x_had_errors_p, x_clear_errors): Update for new type of
`string'.
(x_connection_closed): Block input between just before
delete_frame to when the terminal is unlinked.
* src/xterm.h: Update prototypes.
Lars Ingebrigtsen [Mon, 6 Jun 2022 14:43:12 +0000 (16:43 +0200)]
Fix execute-extended-command help text for remapped commands
* lisp/simple.el (execute-extended-command): Don't provide
misleading help text for remapped commands (bug#23543).
Stephen Berman [Mon, 6 Jun 2022 14:11:50 +0000 (16:11 +0200)]
Allow using xref buttons in non-*Help* buffers
* lisp/help-mode.el (help-buffer): Allow using the xref buttons in
non-*Help* buffers (bug#8147) (but display the result in a *Help*
buffer).
Eli Zaretskii [Mon, 6 Jun 2022 14:10:21 +0000 (17:10 +0300)]
; * lisp/emacs-lisp/lisp.el (raise-sexp): Doc fix. (Bug#55788)
Lars Ingebrigtsen [Mon, 6 Jun 2022 13:49:36 +0000 (15:49 +0200)]
Make find-file-noselect not pick buffers with broken symlinks
* lisp/files.el (find-buffer-visiting): Improve doc string.
(find-file-noselect): Don't pick buffers with broken symlinks,
because that's too confusing (bug#41414).
Lars Ingebrigtsen [Mon, 6 Jun 2022 13:32:03 +0000 (15:32 +0200)]
Improve scheme-mode syntax-rules indentation
* lisp/progmodes/scheme.el (syntax-rules): Indent syntax-rules
with a parameter better (bug#40869).
Lars Ingebrigtsen [Mon, 6 Jun 2022 12:34:41 +0000 (14:34 +0200)]
Improve find-sibling-file error reporting
* lisp/files.el (find-sibling-file): Improve error reporting.
Po Lu [Mon, 6 Jun 2022 12:23:20 +0000 (20:23 +0800)]
Update comments in X error handling code
* src/xterm.c (struct x_error_message_stack, x_error_message)
(x_error_catcher, x_catch_errors, x_had_errors_p)
(x_clear_errors): Long-overdue comment update. Describe the
fields of the error message stack, and the fact that
`x_error_message' is a stack, not a pointer to a string (which
has been true since 2006). Also describe the updated conditions
used to find an applicable error handler and to call
x_uncatch_errors_after_check.
Po Lu [Mon, 6 Jun 2022 11:51:47 +0000 (19:51 +0800)]
Add drag-and-drop API tests
* test/lisp/dnd-tests.el: New file.
(dnd-tests-begin-text-drag):
(dnd-tests-begin-file-drag):
(dnd-tests-begin-drag-files): New tests.
Po Lu [Mon, 6 Jun 2022 11:05:36 +0000 (19:05 +0800)]
Improve handling of remote files during drag-and-drop
* lisp/dnd.el (dnd-begin-drag-files): Don't fail if one remote
file couldn't be downloaded.
Mattias Engdegård [Mon, 6 Jun 2022 08:47:42 +0000 (10:47 +0200)]
Test warning suppressions with lexical binding
* test/lisp/emacs-lisp/bytecomp-tests.el
(test-byte-comp-compile-and-load): Add lexical cookie to file being
compiled as part of the test.
(bytecomp-test--with-suppressed-warnings): Comment out the test
for suppressing warnings when attempting to let-bind `nil`,
as that (1) doesn't work and (2) is a silly thing to do anyway.
Po Lu [Mon, 6 Jun 2022 08:01:41 +0000 (16:01 +0800)]
Fix several more issues with running Lisp during drag-and-drop
* src/xterm.c (handle_one_xevent): Fix _NET_WM_PING cycle again
and set mouse_moved flags during drag-and-drop so reading mouse
events from Lisp continues to work.
Po Lu [Mon, 6 Jun 2022 04:48:40 +0000 (12:48 +0800)]
Signal an error XdndSelection was lost during drag-and-drop
* src/xselect.c (x_handle_selection_clear): Signal an error if
ownership of XdndSelection was lost during drag-and-drop.
Po Lu [Mon, 6 Jun 2022 04:33:41 +0000 (12:33 +0800)]
Make mouse input work properly inside the debugger during DND
* src/xterm.c (x_dnd_begin_drag_and_drop): Set
`x_dnd_recursion_depth'.
(handle_one_xevent): If the recursive edit level is higher than
when DND started, handle mouse events normally.
Stefan Monnier [Mon, 6 Jun 2022 04:04:00 +0000 (00:04 -0400)]
cl-typep: Emit warning when using a type not known to be a type
`cl-typep` has used a heuristic that if there's a `<foo>-p` function,
then <foo> can be used as a type. This made sense in the past where
most types were not officially declared to be (cl-)types, but nowadays
this just encourages abuses such as using `cl-typecase` with
"types" like `fbound`. It's also a problem for EIEIO objects, where
for historical reasons `<foo>-p` tests if the object is of type
exactly `<foo>` whereas (cl-typep OBJ <foo>) should instead test
if OBJ is a *subtype* of `<foo>`.
So we change `cl-typep` to emit a warning whenever this "-p" heuristic
is used, to discourage abuses, encourage the use of explicit
`cl-deftype` declarations, and try and detect some misuses of
`<foo>-p` for EIEIO objects.
* lisp/emacs-lisp/eieio.el (defclass): Define as type not only at
run-time but also for the current compilation unit.
* lisp/emacs-lisp/eieio-core.el (class, eieio-object): Define as types.
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't abuse the
"-p" heuristic.
* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies):
Add entries for frames, windows, markers, and overlays.
(cl-typep): Emit a warning when using a predicate that is not known to
correspond to a type.
* lisp/files.el (file-relative-name): Fix error that can trigger if
there's an(other) error between loading `files.el` and loading
`minibuffer.el`.
Po Lu [Mon, 6 Jun 2022 03:08:19 +0000 (11:08 +0800)]
Rework X selections to make it safe to run the debugger inside converters
* src/keyboard.c (prev_kbd_event): Delete function.
(readable_events): Return 1 if
x_detect_pending_selection_requests returns true.
(kbd_buffer_unget_event): Also delete function, since nested
selection requests are really handled correctly.
(kbd_buffer_get_event): Handle events from the special X
deferred selection queue as well.
* src/keyboard.h: Update prototypes.
* src/xselect.c (struct selection_event_queue)
(selection_input_event_equal, x_queue_event)
(x_start_queuing_selection_requests)
(x_stop_queuing_selection_requests): Delete structs, since they
are no longer required.
(x_handle_selection_request, x_handle_selection_event): Allow
nested selection events.
* src/xterm.c (struct x_selection_request_event): New struct.
(x_handle_pending_selection_requests_1)
(x_handle_pending_selection_requests): Handle all events in the
new selection event queue.
(x_push_selection_request, x_detect_pending_selection_requests):
New functions.
(x_dnd_begin_drag_and_drop): Drain the selection queue here as
well.
(handle_one_xevent): When inside a nested event loop, just push
selections to that queue.
(XTread_socket): Allow reading X events if x_dnd_unwind_flag is
true, even though DND is in progress.
(x_delete_display): Delete pending selection events for the
display that is going away.
* src/xterm.h: Update prototypes.
Stefan Monnier [Sun, 5 Jun 2022 23:51:29 +0000 (19:51 -0400)]
pcomplete.el: Fix part of bug#50470
Try and handle the case where `pcomplete-parse-arguments-function`
directly returns a list of completions.
* lisp/pcomplete.el (pcomplete-parse-arguments): Don't modify the
buffer if we're not allowed to. Instead use the buffer's current
content as the "pattern to be completed" and return the list
of completions as is. Also, use `try-completions` to simplify the
previous code.
Lars Ingebrigtsen [Sun, 5 Jun 2022 22:42:56 +0000 (00:42 +0200)]
Add nohandle-guide images for tree-widget
These are copies of the guide.* files
Lars Ingebrigtsen [Sun, 5 Jun 2022 20:52:59 +0000 (22:52 +0200)]
Re-re-fix previous describe-function change
* lisp/help-fns.el (describe-function): Put back binding removed
by mistake in previous change.
Lars Ingebrigtsen [Sun, 5 Jun 2022 20:48:28 +0000 (22:48 +0200)]
Fix key binding buffer issue in describe-function better
* lisp/help-fns.el (describe-function): Revert previous change here.
(describe-function-1): Just use describe-function-orig-buffer
instead of the key-buffer binding -- this will also make the
rendering results correct when hitting `g' and `l'.
Lars Ingebrigtsen [Sun, 5 Jun 2022 20:37:32 +0000 (22:37 +0200)]
Clarify syntax-ppss doc string
* lisp/emacs-lisp/syntax.el (syntax-ppss): Clarify doc string.
Lars Ingebrigtsen [Sun, 5 Jun 2022 20:29:08 +0000 (22:29 +0200)]
Simplify set-goal-column
* lisp/simple.el (set-goal-column): Simplify the code.
Lars Ingebrigtsen [Sun, 5 Jun 2022 19:48:21 +0000 (21:48 +0200)]
Make `C-h f' look up key bindings in the current buffer again
* lisp/help-fns.el (describe-function): Pass in the correct buffer
to look up key bindings in.
(describe-function-1): Use it.
Lars Ingebrigtsen [Sun, 5 Jun 2022 19:35:56 +0000 (21:35 +0200)]
Make the goal column work for the scrolling commands, too
* doc/emacs/basic.texi (Moving Point): Document it.
* lisp/simple.el (set-goal-column): Update doc string.
* lisp/window.el (scroll-up-command, scroll-down-command): Make
the goal column take effect for these commands, too (bug#17346).
Lars Ingebrigtsen [Sun, 5 Jun 2022 18:32:01 +0000 (20:32 +0200)]
Move two more variables from autoload.el to loaddefs-gen.el
* lisp/emacs-lisp/loaddefs-gen.el (generated-autoload-file)
(generated-autoload-load-name): Move the remaining two autoload.el
variables used by loaddefs-gen.el from autoload.el.
Lars Ingebrigtsen [Sun, 5 Jun 2022 18:17:30 +0000 (20:17 +0200)]
Make finder/cus-dep scraping use generate-lisp-file functions
* lisp/finder.el (finder-compile-keywords):
* lisp/cus-dep.el (custom-make-dependencies): Use
generate-lisp-file functions directly instead of piggy-backing on
the autoload.el functions. (This is part of making autoload.el obsolete.)
Stefan Kangas [Sun, 5 Jun 2022 16:23:17 +0000 (18:23 +0200)]
Don't generate separate autoload file for htmlfontify
* lisp/hfy-cmap.el: Update file local to no longer put htmlfontify
autoloads in htmlfontify-loaddefs.el.
* lisp/htmlfontify.el (htmlfontify-loaddefs): Don't require.
* test/lisp/htmlfontify-tests.el (htmlfontify-autoload): Delete
test (bug#52400).
Lars Ingebrigtsen [Sun, 5 Jun 2022 15:48:29 +0000 (17:48 +0200)]
Rename generate-file to generate-lisp-file
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/international/titdic-cnv.el (tit-process-header)
(miscdic-convert):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
* lisp/international/emoji.el (emoji--generate-file):
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Adjust callers.
* lisp/emacs-lisp/generate-lisp-file.el: Renamed from
generate-file.el. Also rename some keyword parameters and require
a generator function.
Eli Zaretskii [Sun, 5 Jun 2022 14:53:43 +0000 (17:53 +0300)]
; * etc/NEWS: Fix wording of entry about 'file-expand-wildcards'.
Lars Ingebrigtsen [Sun, 5 Jun 2022 14:36:25 +0000 (16:36 +0200)]
Add convenience functions for generating Emacs Lisp files
* lisp/url/url-cookie.el (url-cookie-write-file):
* lisp/international/titdic-cnv.el (tit-process-header):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
* lisp/international/emoji.el (emoji--generate-file):
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric)
* admin/unidata/unidata-gen.el (unidata-gen-file)
(unidata-gen-charprop): Use the new functions.
* lisp/emacs-lisp/generate-file.el: New file to provide
convenience functions for generated files. It's not always
trivial to know which parts of the trailer that has to be
obfuscated to avoid not getting byte-compiled etc, and some parts
of the headers/trailers are usually forgotten when hand-coding
these.
Eli Zaretskii [Sun, 5 Jun 2022 14:08:49 +0000 (17:08 +0300)]
; * lisp/international/fontset.el (setup-default-fontset): Fix comment.
समीर सिंह Sameer Singh [Sun, 5 Jun 2022 11:39:40 +0000 (17:09 +0530)]
Add a fallback font for Tamil Supplement characters
* lisp/international/fontset.el (setup-default-fontset): Add
and entry for "Noto Sans Tamil Supplement". (Bug#55807)
JD Smith [Sun, 5 Jun 2022 13:59:37 +0000 (15:59 +0200)]
Make the Unicode tree widget prettier
* lisp/tree-widget.el (tree-widget-nohandle-guide): New widget:
"One small change is needed to accommodate this
style. `tree-widget-guide’ specifies a single vertical bar “guide”
widget. In the unicode tree, two separate vertical bars are needed
— one “plain” (│), and one which connects to the horizontal
“handle” preceding the node (├)."
(tree-widget--cursors):
(tree-widget):
(tree-widget-value-create): Use it.
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Sun, 5 Jun 2022 13:43:38 +0000 (15:43 +0200)]
Add new command find-sibling-file
* doc/emacs/files.texi (Visiting): Document it.
* lisp/files.el (file-expand-wildcards): Fix up the regexp expansion.
(find-sibling-rules, find-sibling-file): New user option and command.
(find-sibling-file--search): New helper function.
Po Lu [Sun, 5 Jun 2022 13:16:09 +0000 (21:16 +0800)]
Fix file name encoding of Motif drop protocol file selections
* lisp/select.el (xselect-convert-to-filename):
(xselect-convert-to-dt-netfile): Encode in the file name coding
system instead of `raw-text-unix'.
Lars Ingebrigtsen [Sun, 5 Jun 2022 12:08:31 +0000 (14:08 +0200)]
Extend file-expand-wildcards to allow regexps
* doc/lispref/files.texi (Contents of Directories): Document it.
* lisp/files.el (file-expand-wildcards): Extend to allow regexps.
* lisp/emacs-lisp/shortdoc.el (file): Expand the
file-expand-wildcards example.
Po Lu [Sun, 5 Jun 2022 07:34:49 +0000 (15:34 +0800)]
Fix drag-and-drop of files with multibyte filenames
* lisp/dired.el (dired-mouse-drag): Fix re-signalling of errors.
* lisp/select.el (xselect-convert-to-filename):
(xselect-convert-to-text-uri-list):
(xselect-convert-to-dt-netfile): Encode in raw-text-unix.
* src/xgselect.c (suppress_xg_select, release_xg_select): New
functions.
(xg_select): Respect xg_select suppression by delegating to
pselect.
* src/xgselect.h: Update prototypes.
* src/xterm.c (x_dnd_begin_drag_and_drop): Suppress xg_select
during the nested event loop.
(handle_one_xevent): Handle cases where hold_quit is nil inside
a selection event handler during DND.
Eli Zaretskii [Sun, 5 Jun 2022 06:52:09 +0000 (09:52 +0300)]
Fix sorting in ls-lisp.el under -v
* lisp/ls-lisp.el (ls-lisp-version-lessp): Handle correctly the
case where strings begin with numerical parts. More faithful
implementation of the 'strverscmp' spec for fractional parts.
(Bug#55787)
* test/lisp/ls-lisp-tests.el (ls-lisp-test-bug55787): New test.
Po Lu [Sun, 5 Jun 2022 05:03:55 +0000 (13:03 +0800)]
Fix bug#55779
* src/xterm.c (x_update_opaque_region): Don't make GTK reset the
opaque region if F is a child frame.
Po Lu [Sun, 5 Jun 2022 05:02:58 +0000 (13:02 +0800)]
Better respect window manager stacking order
* src/xfns.c (x_frame_list_z_order, Fx_frame_list_z_order): Use
_NET_CLIENT_LIST_STACKING if supported.
* src/xterm.c (x_wm_supports_1): New function. Accept dpyinfo
instead of frame.
(x_wm_supports): Use that function instead.
* src/xterm.h: Update prototypes.
Stefan Kangas [Sun, 5 Jun 2022 04:30:25 +0000 (06:30 +0200)]
Merge from origin/emacs-28
1b8719835a Update to Org 9.5.4
92c5faafd7 Clarify documentation of 'string-to-unibyte'
2848512654 ; * lisp/files.el (find-file): Avoid too short lines in do...
672f9f787f Improve keystrokes in doc strings in some find-file functions
ef5651cc77 Fix segfaults when starting on 80x26 TTY frames
bfa647972f ; Fix doc string of 'delete-selection-repeat-replace-region'
a95d46e00f Make it explicit that a couple of _s in lispref are unders...
5c74c25123 Remove from FAQ the MS-Windows info about BDF fonts
edb48646f2 Fix Display Property manual example
Po Lu [Sun, 5 Jun 2022 02:02:55 +0000 (10:02 +0800)]
Fix positioning of non-system tooltips on GTK builds
* src/xfns.c (compute_tip_xy): Fix coding style.
* src/xterm.c (handle_one_xevent): Set tooltip size immediately
on GTK builds.
Po Lu [Sun, 5 Jun 2022 01:30:45 +0000 (09:30 +0800)]
Adjust last change for GTK+ 2.x
* src/xterm.c (x_tooltip_window_to_frame): Fix build on GTK 2.x.
Po Lu [Sun, 5 Jun 2022 01:24:20 +0000 (09:24 +0800)]
Make `mouse-position' work correctly with GTK tooltips
* src/xterm.c (x_tooltip_window_to_frame): New parameter
`unrelated_tooltip_p'.
(XTmouse_position): Pass that, and if it turns out to be true,
look beneath the tooltip window.
Kyle Meyer [Sat, 4 Jun 2022 20:21:06 +0000 (16:21 -0400)]
Update to Org 9.5.4
Lars Ingebrigtsen [Sat, 4 Jun 2022 16:41:10 +0000 (18:41 +0200)]
Make loaddefs-generate--parse-file more robust
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Ensure that we don't have an autoload cookie on the first column
inside a string.
Lars Ingebrigtsen [Sat, 4 Jun 2022 13:07:01 +0000 (15:07 +0200)]
Make skkdic-convert replacements literal
* lisp/international/ja-dic-cnv.el (skkdic-convert): The
replacement is literal and fixed-case. (The build on EMBA is
failing mysteriously with "Match data clobbered by buffer
modification hooks", so this is mainly a stab in the dark at
fixing that, but it's also generally correct.)
Lars Ingebrigtsen [Sat, 4 Jun 2022 12:16:26 +0000 (14:16 +0200)]
Make vc-mtn obsolete
* lisp/obsolete/vc-mtn.el: Make obsolete (bug#6513).
Lars Ingebrigtsen [Sat, 4 Jun 2022 12:04:41 +0000 (14:04 +0200)]
Fix failing shortdoc test
* lisp/emacs-lisp/shortdoc.el (string): Each example section is
supposed to contain only examples of using the function in
question (as policed by the FAILED shortdoc-examples test).
Po Lu [Sat, 4 Jun 2022 12:00:40 +0000 (20:00 +0800)]
Fix error during DND from both Emacs and GTK at the same time
* src/xterm.c (x_dnd_get_target_window): Make mapping and
releasing the COW atomic. This is to fix a rare bug when
MPX (multi-pointer X) is in use and the user tries to drag
from both GTK and Emacs at the same time using multiple seats.
Lars Ingebrigtsen [Sat, 4 Jun 2022 12:00:10 +0000 (14:00 +0200)]
Further raise-sexp doc string improvement
* lisp/emacs-lisp/lisp.el (raise-sexp): Fix the key binding syntax
in the doc string.
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:57:08 +0000 (13:57 +0200)]
Improve the raise-sexp doc string
* lisp/emacs-lisp/lisp.el (raise-sexp): Try to explain what the
command does (bug#55788).
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:50:07 +0000 (13:50 +0200)]
Fix warnings introduced by the lisp-mode-autoload-regexp change
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): The package name bit
in ###;;;foo-autoload may be missing, so do a lax match (bug#55784).
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:43:58 +0000 (13:43 +0200)]
Add a face to \\= doc string escapes
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Add a face to \\= doc
string escapes (bug#55783).
Lars Ingebrigtsen [Sat, 4 Jun 2022 11:29:53 +0000 (13:29 +0200)]
Further notes about quotation marks in the manual
* doc/lispref/tips.texi (Documentation Tips): Note that we
previously recommended using single quotation marks (bug#55780).
Po Lu [Sat, 4 Jun 2022 10:07:20 +0000 (18:07 +0800)]
Allow keyboard modifiers to control the action taken during dired DND
* doc/emacs/dired.texi (Misc Dired Features): Update
documentation.
* lisp/dired.el (dired-mouse-drag-files): Update defcustom for
new values.
(dired-mouse-drag): Recognize more values of
`dired-mouse-drag-files' and keyboard modifiers.
(dired-mouse-drag-files-map): Add C-down-mouse-1, M-down-mouse-1
and S-down-mouse-1.
Michael Albinus [Sat, 4 Jun 2022 09:23:53 +0000 (11:23 +0200)]
* lisp/emacs-lisp/shortdoc.el (string): Add `string-collate-lessp'.
समीर सिंह Sameer Singh [Wed, 1 Jun 2022 16:59:24 +0000 (22:29 +0530)]
Add support for the Grantha script (bug#55782)
* lisp/language/indian.el ("Grantha"): New language environment.
Add composition rules for Grantha. Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Grantha.
* lisp/leim/quail/indian.el ("grantha"): New input method.
* etc/HELLO: Add two Grantha greetings.
* etc/NEWS: Announce the new language environment.
Po Lu [Sat, 4 Jun 2022 08:19:01 +0000 (16:19 +0800)]
Fix file drag-and-drop on GNUstep
* src/nsselect.m (ns_decode_data_to_pasteboard): Convert URL to
path names when we're using NSFilenamesPboardType.
* src/nsterm.m: ([EmacsView performDragOperation:]): Handle
cases where plist is a string.
Po Lu [Sat, 4 Jun 2022 07:45:41 +0000 (15:45 +0800)]
Support dragging multiple files on NS
This has to use a deprecated pasteboard type, since Emacs uses
the "old" (but not deprecated) dragImage: method for
drag-and-drop, which can't drop file URLs.
* lisp/term/ns-win.el (x-begin-drag): Update accordingly.
* src/nsselect.m (ns_decode_data_to_pasteboard):
(Fns_begin_drag): Allow files to be a list of filenames as well.
Po Lu [Sat, 4 Jun 2022 07:41:39 +0000 (15:41 +0800)]
Fix splurious drag-mouse-1 events after NS drag-and-drop
* src/nsterm.m ([EmacsWindow beginDrag:...]): Clear
dpyinfo->grabbed.
Po Lu [Sat, 4 Jun 2022 07:17:50 +0000 (15:17 +0800)]
Clear mouse face during drag-and-drop
* src/xterm.c (handle_one_xevent): Clear mouse face during drag
and drop, since note_mouse_highlight isn't called.
Eli Zaretskii [Sat, 4 Jun 2022 07:06:43 +0000 (10:06 +0300)]
Clarify documentation of 'string-to-unibyte'
* doc/lispref/nonascii.texi (Converting Representations): Clarify
what 'string-to-unibyte' does. Reported by Richard Hansen
<rhansen@rhansen.org>. (Bug#55777)
Eli Zaretskii [Sat, 4 Jun 2022 06:05:35 +0000 (09:05 +0300)]
Another attempt to void compiler warnings on macOS (bug#55595)
* configure.ac (WERROR_CFLAGS): Use "-Wno-unknown-pragmas" with
Clang.
Po Lu [Sat, 4 Jun 2022 05:27:03 +0000 (13:27 +0800)]
Improve doc of `mouse-drag-mode-line-buffer'
* doc/emacs/frames.texi (Mouse Commands): Document
`mouse-drag-mode-line-buffer'.
* etc/NEWS: Explain where that option is supported.
* lisp/mouse.el (mouse-drag-mode-line-buffer): Likewise.
Po Lu [Sat, 4 Jun 2022 04:27:11 +0000 (12:27 +0800)]
Make XTmouse_position faster during dragging with lots of frames
* src/xterm.c (x_tooltip_window_to_frame): New function.
(XTmouse_position): Use that to find tooltip frames underneath
the pointer instead.
Po Lu [Sat, 4 Jun 2022 02:05:44 +0000 (10:05 +0800)]
Fix leak of toplevel data
* src/xterm.c (x_dnd_compute_toplevels): Make sure to free
`data'.
Po Lu [Sat, 4 Jun 2022 01:51:33 +0000 (09:51 +0800)]
Fix leak of DND toplevels when return-frame is non-nil
* src/xterm.c (x_dnd_free_toplevels): Don't leak DND toplevels
if returning a frame.
(x_dnd_begin_drag_and_drop): Make this function reentrant from
the IO error handler.
Dmitry Gutov [Sat, 4 Jun 2022 00:42:00 +0000 (03:42 +0300)]
Post-review additions
* lisp/progmodes/project.el (project-vc-include-untracked):
Add :version.
(project--vc-list-files): Use 'and' instead of 'when'.
Jan Synáček [Thu, 2 Jun 2022 18:59:53 +0000 (20:59 +0200)]
Add new user option project-vc-include-untracked
* doc/emacs/maintaining.texi (Projects): Document it.
* lisp/progmodes/project.el (project--vc-list-files): Use it.
Dmitry Gutov [Sat, 4 Jun 2022 00:13:42 +0000 (03:13 +0300)]
project-query-replace-regexp: Filter out non-regular files
* lisp/progmodes/project.el (project-query-replace-regexp):
Filter out non-regular files (bug#55382).
Michael Albinus [Fri, 3 Jun 2022 17:55:30 +0000 (19:55 +0200)]
Fix Tramp test
* test/lisp/net/tramp-tests.el (tramp-test31-signal-process):
Skip on MS Windows.
Michael Albinus [Fri, 3 Jun 2022 17:54:31 +0000 (19:54 +0200)]
Add remote file functions to shortdoc
* lisp/net/tramp-integration.el (shortdoc-add-function)
(shortdoc--groups): Declare.
(shortdoc): Configure shortdoc.el to recognize file name functions
for remote access.
Po Lu [Fri, 3 Jun 2022 12:36:24 +0000 (20:36 +0800)]
Fix dired drag and drop actions
* lisp/dired.el (dired-mouse-drag): Make `link' values work
again.
Po Lu [Fri, 3 Jun 2022 12:13:27 +0000 (12:13 +0000)]
Handle dragging multiple files on Haiku
* lisp/term/haiku-win.el (haiku-dnd-selection-converters)
(haiku-dnd-convert-file-name, x-begin-drag): Handle vector
values of selection data.
Eli Zaretskii [Fri, 3 Jun 2022 12:04:42 +0000 (15:04 +0300)]
; Improve documentation of 'battery-update-functions'
* lisp/battery.el (battery-update-functions)
(display-battery-mode): Improve wording of doc strings.
(Bug#55770)
Eli Zaretskii [Fri, 3 Jun 2022 11:50:11 +0000 (14:50 +0300)]
; Improve documentation of new drag-and-drop APIs
* lisp/dnd.el (dnd-begin-text-drag, dnd-begin-file-drag):
* doc/lispref/frames.texi (Drag and Drop): Improve wording of
documentation of 'dnd-begin-text-drag' and 'dnd-begin-file-drag'.
Po Lu [Fri, 3 Jun 2022 11:43:06 +0000 (19:43 +0800)]
Allow dragging multiple files from a Dired buffer
* doc/lispref/frames.texi (Drag and Drop): Document new function
`dnd-begin-drag-files'.
* lisp/dired.el (dired-mouse-drag-files): Update doc string.
(dired-map-over-marks): Accept a new value of ARG `marked',
meaning to not fall back to the current file if no marks were
found.
(dired-mouse-drag): Handle marked files in an intuitive way.
* lisp/dnd.el (dnd-last-dragged-remote-file): Allow list values
as well.
(dnd-remove-last-dragged-remote-file): Handle list values.
(dnd-begin-file-drag): Fix file name expansion.
(dnd-begin-drag-files): New function.
* lisp/select.el (xselect-convert-to-filename): Handle mutiple
files
(a vector of file names):.
Lars Ingebrigtsen [Fri, 3 Jun 2022 11:09:25 +0000 (13:09 +0200)]
Don't issue warnings for Unicode quotes for now
* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-style-warn):
Remove warning for "Unicode quotes" for now (bug#55780).